package com.dyzx.hbb.modules.fcxs.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 客户表
 * @TableName fcxs_customer
 */
@TableName(value ="fcxs_customer")
@Data
public class FcxsCustomer {
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 电话
     */
    private String phone;

    /**
     * 证件号
     */
    private String cardNum;

    /**
     * 生日
     */
    private Long birthday;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 性别  字典信息：sys_global_sex
     */
    private Integer sex;

    /**
     * 身份证-正面
     */
    private Long cardFront;

    /**
     * 身份证-反面
     */
    private Long cardBack;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态 字典信息：sys_global_status
     */
    private Integer status;
    /**
     * 创建日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     * 更新日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 删除标志
     */
    private Integer deleted;

    /**
     * 操作用户编号
     */
    private Long operatorId;

    /**
     * 企业编号
     */
    private Long organId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FcxsCustomer other = (FcxsCustomer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getCardNum() == null ? other.getCardNum() == null : this.getCardNum().equals(other.getCardNum()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getCardFront() == null ? other.getCardFront() == null : this.getCardFront().equals(other.getCardFront()))
            && (this.getCardBack() == null ? other.getCardBack() == null : this.getCardBack().equals(other.getCardBack()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getCardNum() == null) ? 0 : getCardNum().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getCardFront() == null) ? 0 : getCardFront().hashCode());
        result = prime * result + ((getCardBack() == null) ? 0 : getCardBack().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", cardNum=").append(cardNum);
        sb.append(", birthday=").append(birthday);
        sb.append(", age=").append(age);
        sb.append(", sex=").append(sex);
        sb.append(", cardFront=").append(cardFront);
        sb.append(", cardBack=").append(cardBack);
        sb.append(", remark=").append(remark);
        sb.append(", status=").append(status);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", organId=").append(organId);
        sb.append("]");
        return sb.toString();
    }
}